﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Net;

namespace BerkeleyAlgorithm
{
    public class Neighbour
    {
        private IPAddress address;
        private Boolean isMaster;
        private int port;
        private Boolean isAlive;
        public int threadID;
 
        public Neighbour(IPAddress addr,int prt)
        {
            this.address = addr;
            this.isMaster = false;
            this.port = prt;
            this.isAlive = true;
        }


        public IPAddress Address
        {
            get
            {
                return this.address;
            }
            set
            {
                this.address = value;
            }
        }

        public Boolean IsMaster
        {
            get
            {
                return this.isMaster;
            }
            set
            {
                this.isMaster = value;
            }
        }

        public int Port
        {
            get
            {
                return this.port;
            }
            set
            {
                this.port = value;
            }
        }

        public Boolean IsAlive
        {
            get
            {
                return this.isAlive;
            }
            set
            {
                this.isAlive = value;
            }
        }
    }
}
